
<template>
    <div class="school">
        <h3>学校名称：{{schoolName}}</h3> 
        <br/>
        <button @click="sendSchoolName">把学校名称给App</button>
    </div>
</template>

<script>
    export default {
        name: 'School',
        props: ['getSchoolName'],
        data() {
            return {
                schoolName: 'xxx'
                }
            },
        methods: {
            sendSchoolName(){
                this.getSchoolName(this.schoolName)
            }
        },
        }
</script>
<style scoped>
    .school{
        background-color: rgb(42, 165, 132);
        padding: 5px;
    }
</style>